/**
 * Copyright (c) 2016-2019 九点科技 All rights reserved.
 *
 * http://www.9dyun.cn
 *
 * 版权所有，侵权必究！
 */
package com.dian.modules.inv.entity;

import com.dian.common.validator.group.AddGroup;
import com.dian.common.validator.group.UpdateGroup;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.math.BigDecimal;
import com.dian.common.entity.BaseEntity;
import java.util.Date;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import com.fasterxml.jackson.annotation.JsonFormat;
/**
 * 月结表
 *
 * @author xiaolai
 * @email xiaolai@9dyun.cn
 * @date 2019-07-23 10:57:40
 */
@Data
@TableName("inv_goods_account")
public class GoodsAccountEntity extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 总账日期;format:yyyy-MM-dd
     */
    @JsonFormat( pattern="yyyy-MM-dd")
    @NotNull(message="总账日期不能为空",groups = {AddGroup.class,UpdateGroup.class})
    private Date accountDate;



    /**
     * 总账年份
     */
    @NotBlank(message="总账年份不能为空",  groups ={AddGroup.class, UpdateGroup.class})
    @Length(max=20,  groups ={AddGroup.class, UpdateGroup.class}, message="总账年份长度不能超过20个字符")
    private String accountYear;



    /**
     * 总账月份
     */
    @NotBlank(message="总账月份不能为空",  groups ={AddGroup.class, UpdateGroup.class})
    @Length(max=20,  groups ={AddGroup.class, UpdateGroup.class}, message="总账月份长度不能超过20个字符")
    private String accountMonth;



    /**
     * id路径
     */
    @NotBlank(message="id路径不能为空",  groups ={AddGroup.class, UpdateGroup.class})
    @Length(max=200,  groups ={AddGroup.class, UpdateGroup.class}, message="id路径长度不能超过200个字符")
    private String classPathId;



    /**
     * 名称路径
     */
    @NotBlank(message="名称路径不能为空",  groups ={AddGroup.class, UpdateGroup.class})
    @Length(max=200,  groups ={AddGroup.class, UpdateGroup.class}, message="名称路径长度不能超过200个字符")
    private String classPathName;



    /**
     * 商品分类id;来源于base_class.id
     */
    @NotNull(message="商品分类id不能为空",groups = {AddGroup.class,UpdateGroup.class})
    private Long classId;



    /**
     * 商品分类名称;来源于base_class.class_name
     */
    @NotBlank(message="商品分类名称不能为空",  groups ={AddGroup.class, UpdateGroup.class})
    @Length(max=100,  groups ={AddGroup.class, UpdateGroup.class}, message="商品分类名称长度不能超过100个字符")
    private String className;



    /**
     * 商品id;来源于base_goods.id
     */
    @NotNull(message="商品id不能为空",groups = {AddGroup.class,UpdateGroup.class})
    private Long goodsId;



    /**
     * 商品编码;来源于base_goods.goods_code
     */
    @NotBlank(message="商品编码不能为空",  groups ={AddGroup.class, UpdateGroup.class})
    @Length(max=40,  groups ={AddGroup.class, UpdateGroup.class}, message="商品编码长度不能超过40个字符")
    private String goodsCode;



    /**
     * 商品名称;来源于base_goods.name
     */
    @NotBlank(message="商品名称不能为空",  groups ={AddGroup.class, UpdateGroup.class})
    @Length(max=200,  groups ={AddGroup.class, UpdateGroup.class}, message="商品名称长度不能超过200个字符")
    private String goodsName;



    /**
     * 商品型号;来源于base_goods.goods_model
     */
    @NotBlank(message="商品型号不能为空",  groups ={AddGroup.class, UpdateGroup.class})
    @Length(max=100,  groups ={AddGroup.class, UpdateGroup.class}, message="商品型号长度不能超过100个字符")
    private String goodsModel;



    /**
     * 商品规格;来源于base_goods.goods_space
     */
    @NotBlank(message="商品规格不能为空",  groups ={AddGroup.class, UpdateGroup.class})
    @Length(max=100,  groups ={AddGroup.class, UpdateGroup.class}, message="商品规格长度不能超过100个字符")
    private String goodsSpec;



    /**
     * 色号
     */
    @Length(max=40,  groups ={AddGroup.class, UpdateGroup.class}, message="色号长度不能超过40个字符")
    private String colorNumber;



    /**
     * 商品等级:1-优等品-excell;2-一等品-first
     */
    @Length(max=40,  groups ={AddGroup.class, UpdateGroup.class}, message="商品等级长度不能超过40个字符")
    private String itemGrade;



    /**
     * 包装码
     */
    @Length(max=40,  groups ={AddGroup.class, UpdateGroup.class}, message="包装码长度不能超过40个字符")
    private String cfpackCode;



    /**
     * 缺陷
     */
    @Length(max=40,  groups ={AddGroup.class, UpdateGroup.class}, message="缺陷长度不能超过40个字符")
    private String fault;



    /**
     * 生产调度号
     */
    @Length(max=40,  groups ={AddGroup.class, UpdateGroup.class}, message="生产调度号长度不能超过40个字符")
    private String scheduleNo;



    /**
     * 批次
     */
    @Length(max=40,  groups ={AddGroup.class, UpdateGroup.class}, message="批次长度不能超过40个字符")
    private String flot;



    /**
     * 尺寸
     */
    @Length(max=40,  groups ={AddGroup.class, UpdateGroup.class}, message="尺寸长度不能超过40个字符")
    private String itemSize;



    /**
     * 外包装码名称
     */
    @Length(max=40,  groups ={AddGroup.class, UpdateGroup.class}, message="外包装码名称长度不能超过40个字符")
    private String boxingName;



    /**
     * 基础单位id;来源于base_uom.id
     */
    @NotNull(message="基础单位id不能为空",groups = {AddGroup.class,UpdateGroup.class})
    private Long baseUomId;



    /**
     * 基础单位;来源于base_uom.name_name
     */
    @NotBlank(message="基础单位不能为空",  groups ={AddGroup.class, UpdateGroup.class})
    @Length(max=40,  groups ={AddGroup.class, UpdateGroup.class}, message="基础单位长度不能超过40个字符")
    private String baseUomName;



    /**
     * 计量单位id;来源于base_uom.id
     */
    @NotNull(message="计量单位id不能为空",groups = {AddGroup.class,UpdateGroup.class})
    private Long qtyUomId;



    /**
     * 计量单位;来源于base_uom.name_name
     */
    @NotBlank(message="计量单位不能为空",  groups ={AddGroup.class, UpdateGroup.class})
    @Length(max=40,  groups ={AddGroup.class, UpdateGroup.class}, message="计量单位长度不能超过40个字符")
    private String qtyUomName;



    /**
     * 计量单位id;来源于base_uom.id
     */
    @NotNull(message="计量单位id不能为空",groups = {AddGroup.class,UpdateGroup.class})
    private Long auxUomId;



    /**
     * 计量单位;来源于base_uom.name_name
     */
    @NotBlank(message="计量单位不能为空",  groups ={AddGroup.class, UpdateGroup.class})
    @Length(max=40,  groups ={AddGroup.class, UpdateGroup.class}, message="计量单位长度不能超过40个字符")
    private String auxUomName;



    /**
     * 仓库Id;来源于Base_Warehouse.id
     */
    private Long warehouseId;



    /**
     * 仓库编码;来源于Base_Warehouse.Warehouse_Code
     */
    @Length(max=20,  groups ={AddGroup.class, UpdateGroup.class}, message="仓库编码长度不能超过20个字符")
    private String warehouseCode;



    /**
     * 仓库名称;来源于Base_Warehouse.Warehouse_Name
     */
    @Length(max=40,  groups ={AddGroup.class, UpdateGroup.class}, message="仓库名称长度不能超过40个字符")
    private String warehouseName;



    /**
     * 单据状态:1-未审核-WAITCHECK;2-出库核算-OUTCHECK;3-已结算-AUDITED;99-已作废-INVALID
     */
    @NotNull(message="单据状态不能为空",groups = {AddGroup.class,UpdateGroup.class})
    private Integer accountState;



    /**
     * 期初基础数量
     */
    @NotNull(message="期初基础数量不能为空",groups = {AddGroup.class,UpdateGroup.class})
    private BigDecimal beginBaseNum;



    /**
     * 期初库存数量
     */
    @NotNull(message="期初库存数量不能为空",groups = {AddGroup.class,UpdateGroup.class})
    private BigDecimal beginQtyNum;



    /**
     * 期初辅助数量
     */
    @NotNull(message="期初辅助数量不能为空",groups = {AddGroup.class,UpdateGroup.class})
    private BigDecimal beginAuxNum;



    /**
     * 期初可用基础数量
     */
    @NotNull(message="期初可用基础数量不能为空",groups = {AddGroup.class,UpdateGroup.class})
    private BigDecimal beginAvaBaseNum;



    /**
     * 期初可用库存数量
     */
    @NotNull(message="期初可用库存数量不能为空",groups = {AddGroup.class,UpdateGroup.class})
    private BigDecimal beginAvaQtyNum;



    /**
     * 期初可用辅助数量
     */
    @NotNull(message="期初可用辅助数量不能为空",groups = {AddGroup.class,UpdateGroup.class})
    private BigDecimal beginAvaAuxNum;



    /**
     * 期初单价
     */
    @NotNull(message="期初单价不能为空",groups = {AddGroup.class,UpdateGroup.class})
    private BigDecimal beginPrice;



    /**
     * 期初余额
     */
    @NotNull(message="期初余额不能为空",groups = {AddGroup.class,UpdateGroup.class})
    private BigDecimal beginAmount;



    /**
     * 入库基础数量
     */
    private BigDecimal inBaseNum;



    /**
     * 入库库存数量
     */
    private BigDecimal inQtyNum;



    /**
     * 入库辅助数量
     */
    private BigDecimal inAuxNum;



    /**
     * 入库单价
     */
    private BigDecimal inPrice;



    /**
     * 入库余额
     */
    private BigDecimal inAmount;



    /**
     * 出库基础数量
     */
    private BigDecimal outBaseNum;



    /**
     * 出库库存数量
     */
    private BigDecimal outQtyNum;



    /**
     * 出库辅助数量
     */
    private BigDecimal outAuxNum;



    /**
     * 出库单价
     */
    private BigDecimal outPrice;



    /**
     * 出库余额
     */
    private BigDecimal outAmount;



    /**
     * 期末基础数量
     */
    private BigDecimal endBaseNum;



    /**
     * 期末库存数量
     */
    private BigDecimal endQtyNum;



    /**
     * 期末辅助数量
     */
    private BigDecimal endAuxNum;



    /**
     * 期末可用基础数量
     */
    @NotNull(message="期末可用基础数量不能为空",groups = {AddGroup.class,UpdateGroup.class})
    private BigDecimal endAvaBaseNum;



    /**
     * 期末可用库存数量
     */
    @NotNull(message="期末可用库存数量不能为空",groups = {AddGroup.class,UpdateGroup.class})
    private BigDecimal endAvaQtyNum;



    /**
     * 期末可用辅助数量
     */
    @NotNull(message="期末可用辅助数量不能为空",groups = {AddGroup.class,UpdateGroup.class})
    private BigDecimal endAvaAuxNum;



    /**
     * 期末单价
     */
    private BigDecimal endPrice;



    /**
     * 期末余额
     */
    private BigDecimal endAmount;






}
